package dudghk;

import java.util.Scanner;

public class J10Return {
	//return문을 사용하는 메서드
	public static void main(String[] args){
		int x, y ; //사칙연산할 입력값
		int sum, minus, multiple;
		double divide;
		
		Scanner sc=new Scanner(System.in);
		System.out.println("x값을 입력하세요");
		x=sc.nextInt();
		System.out.println("y값을 입력하세요");
		y=sc.nextInt();
		
		//먼저 메서드가 호출되고 
		//메서드가 return한 결과값을 변수에 저장
		sum=getSum( x,  y);
		minus=getMinus(x,y);
		multiple=getMultiple(x,y);
		divide=getDivide(x,y);
		
		
		//출력
		System.out.println("당신이 적은"+x+"입니다");
		System.out.println("당신이 적은"+y+"입니다");
		System.out.println("x+y의 합은"+sum+"입니다");
		System.out.println("x-y의 빼기는"+minus+"입니단");
		System.out.println("x*y는"+multiple+"입니당");
		System.out.println("x/y는"+divide+"입니다");
		
	}//main

	
	private static double getDivide(int x, int y) {
	double divide;
	divide=(double)x/(double)y;
		return divide;
	}


	private static int getMultiple(int x, int y) {
		
		return (x*y);
	}


	private static int getMinus(int x, int y) {

		return (x-y);
	}

	private static int  getSum(int x, int y) {
		return (x+y);
		
	}


	
}//calss
